<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::group(
    [
        'prefix' => 'addon/school',
        'middleware' => 'admin.auth',
        'namespace' => 'Addons\School\Controllers'
    ], function () {
    Route::get('/', 'SchoolController@index')->name('addon.school.index');
    
    Route::get('/edit', 'SchoolController@edit')->name('addon.school.edit');
    Route::post('/edit', 'SchoolController@update');
    Route::get('/create', 'SchoolController@create')->name('addon.school.create');
    Route::post('/create', 'SchoolController@store');
    Route::post('/destroy', 'SchoolController@destroy');
});